<ion-view view-title="购物车" class="cart" cache-view="false">
    <ion-content class=>
        <ion-list>
            <div ng-repeat="product in items" class="cartList" >
                <div  class="item padding-horizontal" on-swipe-left="swipeItem($event)">
                    <div class="left">
                        <label class="checkbox">
                            <input type="checkbox" ng-change="filterItems()" ng-model="product.selected">
                        </label>
                    </div>
                    <div class="center">
                        <img ng-src="data:image/jpg;base64,{{product.Picture}}" alt=""/>
                    </div>
                    <div class="right">
                        <div class="product-name">
                            <div class="label">商品 :</div>
                            <div class="label-content">
                                {{product.ItemName}}
                            </div>
                        </div>
                        <div class="product-name">
                            <div class="label">单价 :</div>
                            <div class="label-content">
                                ￥{{product.Price}}
                            </div>
                        </div>
                        <div class="product-name">
                            <div class="label">数量 :</div>
                            <div class="label-content">
                                <a on-tap="changecount(product,false)"><i class="icon ion-ios-minus-empty"></i></a>
                                <input  type="text" ng-init="product.OrderByQtyPU=product.OrderByQtyPU||1;product.money=product.OrderByQtyPU*product.Price" ng-model="product.OrderByQtyPU" ng-blur="countMoney(product)"/>
                                <a on-tap="changecount(product,true)"><i class="icon ion-ios-plus-empty"></i></a>
                            </div>
                        </div>
                        <div class="product-name">
                            <div class="label">小计 :</div>
                            <div class="price label-content">
                                ￥{{product.money}}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="buttons-wrap">
                    <a class="button button-assertive" on-tap="removeItem(product,$index,$event)">
                        删除
                    </a>
                    <a href="" class="button button-calm" on-tap="cancelRemove($event)">取消</a>
                </div>
            </div>


        </ion-list>
        <p class="padding">
            <br />
        </p>
    </ion-content>

    <div class="bar bar-footer">
        <div class="pull-left">
            <label class="checkbox">
                <input type="checkbox" ng-change="selectAll()" ng-model="allList.selected">全选
            </label>
        </div>
        <div class="pull-left summary">
            <ul>
                <li>
                    <span class="label">合计:</span>
                    <span class="price red">￥ {{allList.money}}</span>
                </li>
                <li>
                    <span class="label">信用余额:</span>
                    <span class="price">￥ {{credit}}</span>
                </li>
            </ul>


        </div>
        <a  class="pull-right" on-tap="forwardAccount()">
            下订单
        </a>
    </div>


</ion-view>